<?php if (!defined('THINK_PATH')) exit(); ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8"><LINK 
href="<?php echo BASE_DIR; ?>top/admincp.css" type=text/css rel=stylesheet>
<META content="MSHTML 6.00.2900.3268" name=GENERATOR>
<style type="text/css">
<!--
.STYLE1 {color: #FF0000}
-->
</style>
<script language=javascript> 
//第三种方法，结合上述两种方法 
function selectall3() 
{ 
    var a = document.getElementsByTagName("input"); 
    for (var i=0; i<a.length; i++) 
       if (a[i].type == "checkbox") a[i].checked =!a[i].checked; 
   } 
</script> 
</HEAD>
<BODY topMargin=10>
<DIV id=append_parent></DIV>
<TABLE cellSpacing=6 cellPadding=2 width="100%" border=0>
  <TBODY>
  <TR>
    <TD>
      <TABLE class=guide cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR>
          <TD>用户管理&nbsp;»&nbsp;站内短信</TD>
        </TR></TBODY></TABLE><BR>
      <FORM id=settings name=settings action="<?php echo url('AdminDels','Sms_main');?>" method=post>
        <TABLE class=tableborder cellSpacing=0 cellPadding=0 width="100%" 
border=0>
        <TBODY>
        <TR class=header>
          <TD width="15%">编号</TD>
          <TD width="25%">发送人/接收人</TD>
          <TD width="30%">标题</TD>
          <TD width="20%">发送时间</TD>
          <TD width="10%">其他操作</TD>
        </TR>
        <TBODY>
		<?php foreach($SMS as $S): ?>
        <TR>
          <TD width="15%" class=altbg0><input name="main_id[]" type="checkbox" value="<?php echo $S['main_id']; ?>" class="checkbox" <?php echo $S['sms_top'] == 'Y' ? "disabled=\"disabled\"" : ''; ?>><?php echo $S['main_id']; ?></TD>
          <TD width="25%" class=altbg0><?php echo $S['Sendeuser']['username']; ?><span class="STYLE1"> (To)</span> <?php echo $S['Toeuser']['username'];?></TD>
          <TD width="30%" class=altbg0>
		  <?php
		  //如果字符串长度大于48个字符，将进行标题截取
		  echo (strlen($S['title']) >= 48) ? mb_substr($S['title'],0,48).'...' : $S['title']; 
		  ?>
		  <?php echo ($S['sms_top'] == 'Y') ? "<span style=\"color:#FF0000; font:\'宋体\'\" title=置顶条目>置顶</span>" : ''; ?>
		  <?php echo ($S['sms_state'] == 'N') ? "<span style=\"color:#FF9900; font:\'宋体\'\" title=未读条目>未读</span>" : ""; ?></TD>
          <TD width="20%" class=altbg0><?php echo date('Y-m-d H:i:s',$S['created']); ?></TD>
          <TD width="10%" class=altbg0>
		  <A href="<?php echo url('AdminDels','Sms_main',NULL,NULL,array('main_id'=>$S['main_id'])); ?>" title="点击进行删除">删除</A> <a href="<?php echo url('AdminSetSmsTop','Sms_main',NULL,NULL,array('main_id'=>$S['main_id'],'Static'=>$S['sms_top'])); ?>">
		  <?php if($S['sms_top'] == 'Y') { echo "<span style=\"color:#FF0000; font:\'宋体\'\" title=置顶条目>取消置顶</span>"; }else{ echo '置顶'; }?>
		  </a></TD>
        </TR>
		<?php endforeach; ?>
        <TR>
          <TD colspan="5" class=altbg0><?php echo $page; ?></TD>
          </TR></TBODY></TABLE>
        <BR>
      <CENTER>
	    <input name="thes" type="button" onClick="javascript:selectall3()" value="全选?" class="button"/>
        <INPUT name=Submit type=submit class=button id="Submit" value="删 除 选 中">
		<INPUT name="Submit" type=submit class=button id="Submit" value="清除过期短信">
      </CENTER></FORM></TD></TR></TBODY></TABLE><BR><BR>
<DIV class=footer>
<HR width="80%" color=#9db3c5 noShade SIZE=0>
Powered by <A style="COLOR: #666" href="http://www.ThankPHP.com/" 
target=_blank><B>ThankPHP!</B> 0.1.0</A> &nbsp;© 2009-2010, <B><A 
style="COLOR: #666" href="http://www.ThankPHP.com/" target=_blank>ThankPHP 
Inc.</A></B><SPAN class=smalltxt></SPAN></DIV>
</BODY></HTML>
